package com.ly.ocw.web.weixin;

import java.io.IOException;

import org.apache.http.client.ClientProtocolException;

import com.ly.ocw.utils.HttpUtil;

public class WeixinApiTest {
	private static final String TOKEN = "Sg3HIqnochcQr8HqAwv73inULf0qerhSp7Yhzgy0BGvqFqoNa9CJYMtN5O6djORCGnLjVVf7L3fFdbMFFVlrSAt1mlUDGepNfbR5IEJV4tw";
	
	public static void main(String[] args) throws ClientProtocolException, IOException {

		String url = "https://api.weixin.qq.com/card/get?access_token="+TOKEN;
		String body = "{\"card_id\":\"pfOPyjhjShFW-zKtyYxhQ-qzOB-4\"}";

		HttpUtil.httpPost(url, body);
	}

	private static void batchGetCards() throws ClientProtocolException, IOException {
		String url = "https://api.weixin.qq.com/card/batchget?access_token="+TOKEN;
		String body = "{\"offset\": 0,\"count\": 45, \"status_list\": []}";

		HttpUtil.httpPost(url, body);
	}

}
